
def internal_call1():
  """Internal call DN1 to DN2, abnormal release DN1"""
  SipPhone1.MakeCall(DN2)
  SipPhone1.ReleaseCall()


def internal_call2():
  """Internal call DN1 to DN2, release DN1"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone1.ReleaseCall()
  
def internal_call3():
  """Internal call DN1 to DN2, release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.ReleaseCall()  


def internal_trans1():
  """Internal call DN1 to  DN2, two step transfer to DN3, release DN3"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteTransfer()
  SipPhone3.ReleaseCall()

def internal_trans2():
  """Internal call DN1 to  DN2, two step transfer to DN3, abnormal release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.ReleaseCall()
  SipPhone1.ReleaseCall()

def internal_trans3():
  """Internal call DN1 to DN2, two step transfer to DN3, completed before consulted party answer"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.CompleteTransfer()
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()

def internal_trans4():
  """Internal call, two step transfer to DN3, completed before consulted party answer, abnor"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.CompleteTransfer()
  SipPhone1.ReleaseCall()


def internal_trans9():
  """something"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone2.InitiateTransfer(DN1)
  SipPhone2.CompleteTransfer()
  SipPhone1.AnswerCall()
  SipPhone3.ReleaseCall()

def internal_conf1():
  """Internal call DN1 to DN2, internal conference to DN3, release DN1, DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteConference()
  SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()

def internal_conf2():
  """Internal call DN1 to DN2, DN2 cinit conference to DN3, abnorl release DN2, release DN1"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone2.ReleaseCall()
  SipPhone1.ReleaseCall()


def internal_conf3():
  """Internal call DN1 to DN2, DN2 cinit conference to DN3, release DN1, DN3 answe,r release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone1.ReleaseCall()
  SipPhone3.AnswerCall()
  SipPhone2.ReleaseCall()